<div class="header_right">
<div class="header">
<div class="content">
<% if(session['user'].nil?) %>
	<ul>
		<li><span>Index</span></li>
		<li>
			<ul>
				<li>
					<%= link_to 'login', { :controller => 'user', 
										   :action => 'login' } %>
				</li>
			</ul>
		</li>
	</ul>
<% else %>
	<ul>
		<li><span>Index</span></li>
		<li>
			<ul>
				<li>
					<%= link_to 'dashboard', { :controller => 'dashboard' } %>
				</li>
				<li>
					<%= link_to 'change password', 
								{ :controller => 'password_changer' } %>
				</li>
				<li>
					<%= link_to 'logout', { :controller => 'user', 
											:action => 'logout' } %>
				</li>
			</ul>
		</li>
		<% if((session['user'].rights & 1) > 0 || 
			  (session['user'].group.rights & 1) > 0) -%>
			<li><span>Student</span></li>
			<li><ul>
				<li>
				<%= link_to 'take exams', { :controller => 'take_exam' } %> 
				</li>
				<li>
				<%= link_to 'gradebook', { :controller => 'gradebook' } %> 
				</li>
			</ul></li>
		<% end %>
		<% if((session['user'].rights & 2) > 0 || 
			  (session['user'].group.rights & 2) > 0) -%>
			<li><span>Teacher</span></li>
			<li><ul>
				<li>
				<%= link_to 'manage exams', { :controller => 'exam' } %>
				</li>
				<li>
				<%= link_to 'upload images', 
							{ :controller => 'image' } %> 
				</li>
				<li>
				<%= link_to 'activate exams', { :controller => 'activation' } %> 
				</li>
				<li>
				<%= link_to 'view taken exams', 
							{ :controller => 'student_exam' } %> 
				</li>
			<ul></li>
		<% end %>
		<% if((session['user'].rights & 4) > 0 ||
			  (session['user'].group.rights & 4) > 0) -%>
			<li><span>Admin</span></li>
			<li><ul>
				<li>
				<%= link_to 'manage users', { :controller => 'admin' } %>
				</li>
				<li>
				<%= link_to 'manage groups', { :controller => 'admin_group' } %> 
				</li>
			</ul></li>
		<% end %>
	</ul>
<% end %>
</div>
</div>
</div>
<div class="footer_right">
<div class="footer">
</div>
</div>